package com.mxpio.erp.common.mes.vo;

import com.mxpio.erp.common.mes.entity.ManufactureWorkOrder;
import com.mxpio.erp.common.mes.entity.ManufactureWorkOrderSn;
import com.mxpio.erp.common.mes.entity.ManufactureWorkOrderTask;
import com.mxpio.erp.common.technology.entity.*;
import com.mxpio.erp.common.workshop.entity.ManufactureOrder;
import com.mxpio.erp.common.workshop.entity.ManufactureOrderRoute;
import com.mxpio.erp.common.workshop.entity.ManufactureOrderRouteFixture;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Schema(description = "mes扫描vo（方法传参、数据返回）")
@Data
public class ScanInfoVo implements Serializable {
    private static final long serialVersionUID = 1L;
    /**生产订单编号*/
    private String bizNo;
    /**物料编码*/
    private String itemCode;
    /**物料名称*/
    private String itemName;
    /**批次号*/
    private String batchCode;
    /**批次数量*/
    private Integer batchNum;
    /**报废数量*/
    private Integer scrapNum;//机加 加工工位报工，填写的报废数量
    /**合格数量*/
    private Integer qualifiedNum;//合格数量，冗余字段 可通过批次数量减去报废数量获取
    /**工单工序任务编号*/
    private String taskCode;
    @Schema(description = "sn号")
    private String taskSnCode;

    @Schema(description  = "作业单元编码")
    private String workUnitCode;

    @Schema(description  = "作业单元名称")
    private String workUnitName;

    @Schema(description = "工作中心")
    private String workCenterCode;
    /**作业人*/
    private String operator;
    /**操作类型*/
    private String operationType;
    /**扫描时间*/
    private Date scanTime;

    private Integer batchNumNow;//当前批次数量
    private String procCode;//工序编码

    private Integer procOrder;//工序顺序
    private String procClass;//工序分类：区分是否为检测工序 1:加工/2：检测/3：返修/4：包装
    private String wkshopType;//车间类型
    private String errorRange;//误差范围
    private String batchWorkEnable;//批次报工
    private String autoWorkEnable;//自动报工
    private String triggerManualWorkEnable;//触发手动报工按钮
    private Date frontReportTime;//前置报工时间
    private String reportTimeType;//报工时间类型
    private Integer orderCompNum;//订单完工数量    /**子批次数量*/
    private Integer reportNum;//报工数量

    @Dict(dicCode = "ERP_MES_PROC_MODE")
    @Schema(description = "加工模式")//区分机加、装配
    private String procMode;

    /**子批次编码*/
    private String splitBatchCode;
    /**子批次数量*/
    private Integer splitBatchNum;
    /**
     * 下线
     */
    /**下线数量*/
    private Integer offlineNum;
    /**下线工序*/
    private String offlineProc;
    /**下线工艺名称*/
    private String offlineProcName;
    /**下线原因*/
    private String offlineReason;
    /**原因描述*/
    private String detailReason;
    /**发生故障工序*/
    private String occurFaultyProcCode;
    /**发生故障工序名称*/
    private String occurFaultyProcName;
    /**发生故障工序序号*/
    private Integer occurFaultyProcOrder;

    private ManufactureOrder manufactureOrder;//生产订单
    private ManufactureWorkOrder manufactureWorkOrder;//工单
    private WorkUnit workUnit;//作业单元
    private ManufactureWorkOrderTask manufactureWorkOrderTask;//工单工序任务
    private List<ManufactureOrderRoute> orderRouteList;//订单工艺路线
    private List<ProdTecRoutProcTechDrawing> procTechDrawings;//产品工艺路线明细(工序)工艺图纸
    private List<ItemDesignFile> itemDesignFiles;//产品设计文件
    private List<ManufactureOrderRouteFixture> procFixtures;//订单工艺路线工序上的工装夹具
    private Item productItem;//订单产品对象
    private ItemQualityProp productQualityProp;//产品质量属性对象
    private ManufactureOrderRoute manufactureOrderRoute;//订单工艺路线和当前作业单元匹配到工艺路线工序信息

    private List<ManufactureWorkOrderSn> snList;//工单工序任务sn关系
}
